package com.xuanyuanxinyu.func.workmanager

import android.annotation.SuppressLint
import android.content.Context
import android.util.Log
import androidx.work.Worker
import androidx.work.WorkerParameters


class EchoWorker(context : Context,parameters : WorkerParameters) : Worker(context,parameters) {
    @SuppressLint("RestrictedApi")
    override fun doWork() : Result {
        return when (inputData.size()) {
            0 -> {
                Log.d("1111","EchoWorker 返回size=0")
                Result.failure()
            }
    
            else -> {
                Log.d("1111","EchoWorker 返回size>0")
                Result.success(inputData)
            }
        }
    }
}
